{extend name="public/base" /}

{block name="body"}
    <div class="main-title">
        <h2>{$meta_title}</h2>
    </div>
    <form action="{:url()}" method="post" class="form-horizontal">
        <div class="form-item">
            <label class="item-label">学生名称 *<span class="check-tips">（必填,学生名称）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="name" value="{$_info.name}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">手机号 *<span class="check-tips">（手机号码）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="phone" value="{$_info.phone}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">性别</label>
            <div class="controls">
	            <select name="gender" class="input-large">
					<option value="0">未知</option>
					<option value="1">男</option>
					<option value="2">女</option>
				</select>
			</div>
        </div>
        
		<div class="form-item">
            <label class="item-label">OPENID<span class="check-tips">（微信的openid）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="openid" value="{$_info.openid}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">学习阶段</label>
            <div class="controls">
	            <select name="level">
					{volist name=":config('student_level_list')" id="vo"}
						<option value="{$key}" {eq name="_info.level" value="$key"}selected{/eq}>{$vo}</option>
					{/volist}
				</select>
			</div>
        </div>
        <div class="form-item">
            <label class="item-label">状态</label>
            <div class="controls">
	            <select name="state" class="input-large">
					<option value="0">禁用</option>
					<option value="1">正常</option>
					<option value="2">已体验</option>
					<option value="3">已购课</option>
					<option value="4">课程已结束</option>
				</select>
			</div>
        </div>
		<div class="form-item">
			<label class="item-label">备注</label>
			<div class="controls">
				<label class="textarea input-large"><textarea name="comment">{$_info.comment}</textarea></label>
			</div>
		</div>
        <div class="form-item">
        	<label class="item-label"></label>
        	<input type="hidden" name="id" value="{$_info.id}"/>
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
{/block}

{block name="script"}
    <script type="text/javascript">
    	Think.setValue("gender", {$_info.gender|default=0});
    	Think.setValue("state", {$_info.state|default=1});
        //导航高亮
        highlight_subnav('{:url('Student/index')}');
    </script>
{/block}
